package yc.star.judge.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import yc.star.api.domain.dto.JudgeSubmitDTO;
import yc.star.api.domain.vo.UserQuestionResultVO;
import yc.star.common.controller.BaseController;
import yc.star.common.domain.AppResult;
import yc.star.judge.service.IJudgeService;

@RestController
@RequestMapping("/judge")
public class JudgeController extends BaseController {

    @Autowired
    private IJudgeService judgeService;

    @PostMapping("/doJudgeJavaCode")
    public AppResult<UserQuestionResultVO> doJudgeJavaCode(@RequestBody JudgeSubmitDTO judgeSubmitDTO) {
        return AppResult.success(judgeService.doJudgeJavaCode(judgeSubmitDTO));
    }

}